﻿using System;
using System.Linq;

namespace NpCrm.DataAccess.Core
{
    public interface IRepository<TEntity, in TId> : IDisposable where TEntity : class
    {
        void Add(TEntity entity);
        IQueryable<TEntity> All();
        TEntity GetById(TId entityId);
        void Delete(TEntity entity);
        void Commit();
    }
}
